:root {
    --theme-color: #5fb4f1;
    --background-color-1: #ffffff;
    --background-color-2: #f7f7f8;
    --background-color-transparent: rgba(255, 255, 255, 0.75);
    --text-color: #000000;
    --link-color: #26282e;
    --border-color: #cacaca;
    --el-color-primary: #5fb4f1 !important;
    --el-fill-color: #f0f2f5 !important;
    --el-fill-color-light: #f0f2f5 !important;
    --el-text-color-primary: #303133 !important;
    --el-mask-color: rgba(255, 255, 255, 0.9) !important;
    --scrollbar-track-color: rgba(95, 97, 101, 0.3);
    --text-color1: black;
    --bg-color: #f5f5f5;
    --text-color3: black;
    --bg-color5: #e9e9e9;
    --active-color: black;
    --table-thead-color: #dfe2e5;
    --table-border-color: #f8f8f8;
    --menu-hover: rgb(211, 211, 211);
    --message-bg: rgb(192, 228, 254);
    --message-bg2: rgb(229, 229, 230);

    pre code.hljs {
        display: block;
        overflow-x: auto;
        padding: 1em;
    }

    code.hljs {
        padding: 3px 5px;
    }

    .hljs {
        color: #383a42;
        background: #fafafa;
    }

    .hljs-comment,
    .hljs-quote {
        color: #a0a1a7;
        font-style: italic;
    }

    .hljs-doctag,
    .hljs-formula,
    .hljs-keyword {
        color: #a626a4;
    }

    .hljs-deletion,
    .hljs-name,
    .hljs-section,
    .hljs-selector-tag,
    .hljs-subst {
        color: #e45649;
    }

    .hljs-literal {
        color: #0184bb;
    }

    .hljs-addition,
    .hljs-attribute,
    .hljs-meta .hljs-string,
    .hljs-regexp,
    .hljs-string {
        color: #50a14f;
    }

    .hljs-attr,
    .hljs-number,
    .hljs-selector-attr,
    .hljs-selector-class,
    .hljs-selector-pseudo,
    .hljs-template-variable,
    .hljs-type,
    .hljs-variable {
        color: #986801;
    }

    .hljs-bullet,
    .hljs-link,
    .hljs-meta,
    .hljs-selector-id,
    .hljs-symbol,
    .hljs-title {
        color: #4078f2;
    }

    .hljs-built_in,
    .hljs-class .hljs-title,
    .hljs-title.class_ {
        color: #c18401;
    }

    .hljs-emphasis {
        font-style: italic;
    }

    .hljs-strong {
        font-weight: 700;
    }

    .hljs-link {
        text-decoration: underline;
    }
}

:root[theme="dark"] {
    --theme-color: #5fb4f1;
    --background-color-1: #33363b;
    --background-color-2: #242527;
    --background-color-transparent: rgba(41, 42, 43, 0.75);
    --text-color: #e5e5e5;
    --link-color: #c9c9c9;
    --border-color: #b2b2b2;
    --el-color-primary: #5fb4f1 !important;
    --el-fill-color: #33363b !important;
    --el-fill-color-light: #33363b !important;
    --el-text-color-primary: #b2b2b2 !important;
    --el-mask-color: rgba(12, 12, 12, 0.9) !important;
    --scrollbar-track-color: rgba(95, 97, 101, 0.3);
    --text-color1: #e6e6e6;
    --bg-color: #292a2b;
    --text-color3: #757575;
    --bg-color5: #303233;
    --active-color: #2996ff;
    --table-thead-color: #2b2d2e;
    --table-border-color: #555;
    --bg-color1: #292a2b;
    --menu-hover: rgb(34, 34, 34);
    --message-bg: rgb(0, 80, 141);
    --message-bg2: rgb(42, 42, 43);

    pre code.hljs {
        display: block;
        overflow-x: auto;
        padding: 1em;
    }

    code.hljs {
        padding: 3px 5px;
    }

    .hljs {
        color: #abb2bf;
        background: #282c34;
    }

    .hljs-comment,
    .hljs-quote {
        color: #5c6370;
        font-style: italic;
    }

    .hljs-doctag,
    .hljs-formula,
    .hljs-keyword {
        color: #c678dd;
    }

    .hljs-deletion,
    .hljs-name,
    .hljs-section,
    .hljs-selector-tag,
    .hljs-subst {
        color: #e06c75;
    }

    .hljs-literal {
        color: #56b6c2;
    }

    .hljs-addition,
    .hljs-attribute,
    .hljs-meta .hljs-string,
    .hljs-regexp,
    .hljs-string {
        color: #98c379;
    }

    .hljs-attr,
    .hljs-number,
    .hljs-selector-attr,
    .hljs-selector-class,
    .hljs-selector-pseudo,
    .hljs-template-variable,
    .hljs-type,
    .hljs-variable {
        color: #d19a66;
    }

    .hljs-bullet,
    .hljs-link,
    .hljs-meta,
    .hljs-selector-id,
    .hljs-symbol,
    .hljs-title {
        color: #61aeee;
    }

    .hljs-built_in,
    .hljs-class .hljs-title,
    .hljs-title.class_ {
        color: #e6c07b;
    }

    .hljs-emphasis {
        font-style: italic;
    }

    .hljs-strong {
        font-weight: 700;
    }

    .hljs-link {
        text-decoration: underline;
    }
}

/* 内容页 */
.content {
    color: var(--text-color1);
    word-break: break-all;
}

/* .content 编辑器样式 */
.content a {
    color: #4183c4;
    position: relative;
}

.content a::after {
    content: "";
    display: block;
    width: 0;
    height: 2px;
    position: absolute;
    bottom: 0px;
    left: 50%;
    background-color: #4183c4;
    transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
    -moz-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    -o-transform: translateX(-50%);
}

.content a:hover::after {
    width: 100%;
}

.content img {
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
    margin: 10px 0;
    cursor: pointer;
    max-width: 100%;
    max-height: 400px;
}

.content img:hover {
    transform: scale(1.02);
    -webkit-transform: scale(1.02);
    -moz-transform: scale(1.02);
    -ms-transform: scale(1.02);
    -o-transform: scale(1.02);
    box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px,
        rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
}

.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
    position: relative;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 10px 0;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}

.content h1:hover a.anchor,
.content h2:hover a.anchor,
.content h3:hover a.anchor,
.content h4:hover a.anchor,
.content h5:hover a.anchor,
.content h6:hover a.anchor {
    text-decoration: none;
}

.content h1 tt,
.content h1 code {
    font-size: inherit;
}

.content h2 tt,
.content h2 code {
    font-size: inherit;
}

.content h3 tt,
.content h3 code {
    font-size: inherit;
}

.content h4 tt,
.content h4 code {
    font-size: inherit;
}

.content h5 tt,
.content h5 code {
    font-size: inherit;
}

.content h6 tt,
.content h6 code {
    font-size: inherit;
}

.content h1 {
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #bebebe;
}

.content h2 {
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #bebebe;
}

.content h3 {
    font-size: 1.5em;
    line-height: 1.43;
}

.content h4 {
    font-size: 1.25em;
}

.content h5 {
    font-size: 1em;
}

.content h6 {
    font-size: 1em;
    color: #777;
}

.content p,
.content blockquote,
.content ul,
.content ol,
.content dl,
.content table {
    margin: 0.8em 0;
}

.content li > ol,
.content li > ul {
    margin: 0 0;
}

.content hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

.content li p.first {
    display: inline-block;
}

.content ul,
.content ol {
    padding-left: 30px;
    list-style-type: disc;
}

.content ul:first-child,
.content ol:first-child {
    margin-top: 0;
}

.content ul:last-child,
.content ol:last-child {
    margin-bottom: 0;
}

.content blockquote {
    border-left: 4px solid var(--active-color);
    padding: 10px 15px;
    color: #777777;
}

.content blockquote p {
    margin: 0;
}

.content blockquote blockquote {
    padding-right: 0;
}

.content table {
    padding: 0;
    word-break: initial;
    border-collapse: collapse;
}

.content table thead tr {
    background-color: var(--table-thead-color);
}

.content table tr th {
    font-weight: bold;
    border-left: 2px solid var(--table-border-color);
    border-right: 2px solid var(--table-border-color);
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}

.content table tbody tr {
    border-top: 2px solid var(--table-border-color);
    margin: 0;
    padding: 0;
}

.content table tbody tr:nth-child(2n) {
    background-color: var(--bg-color5);
}

.content table tbody tr:nth-child(2n + 1) {
    background-color: var(--bg-color5);
}

.content table tr td {
    border-left: 2px solid var(--table-border-color);
    border-right: 2px solid var(--table-border-color);
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}

.content table tr th:first-child,
.content table tr td:first-child {
    border-left-width: 0px;
}

.content table tr th:last-child,
.content table tr td:last-child {
    border-right-width: 0px;
}

.content code,
.content tt {
    background-color: var(--bg-color5) !important;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

.content code {
    background-color: var(--bg-color5);
    white-space: pre-wrap;
}

.content p code {
    font-size: 0.9em;
    background-color: var(--bg-color5) !important;
    padding: 0.3em;
    padding-top: 0.15em;
    padding-bottom: 0.15em;
    border-radius: 0.25rem;
}

.content pre {
    background-color: var(--bg-color5);
    padding: 10px 10px;
    box-sizing: border-box;
    word-break: break-all;
    margin-bottom: 10px;
}

.content kbd {
    background: var(--bg-color5);
    color: var(--text-color1);
    box-shadow: 0 3px 0 var(--scrollbar-track-color);
    padding: 2px 8px;
    margin: 0 3px;
}

.content ul,
.content ol {
    list-style: revert;
    padding-left: 30px;
}

.content .hljs ol li {
    &::marker {
        color: gray;
    }
}

.content strong {
    display: block;
}

.content {
    code,
    kbd,
    code * {
        font-family: "Fira Code" !important;
    }

    pre {
        position: relative;

        .copyBtn {
            position: absolute;
            right: 27px;
            top: 16px;
            padding: 5px 10px;
            background-color: var(--bg-color);
            cursor: pointer;
            user-select: none;
            border-radius: 5px;
        }
    }
}
